-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factory reset #383
Factory reset #383
Conversation
b149b2e
to
2a7401e
Compare
Relevant nitropy PR: Nitrokey/pynitrokey#472 |
2a7401e
to
36db179
Compare
can you please rebase on top of main to make the tests work? + a |
d16dc8d
to
cf7ac5a
Compare
assert!(should_preserve_file(path!("/fido/sec/00"))); | ||
assert!(should_preserve_file(path!("/fido/x5c/00"))); | ||
assert!(should_preserve_file(path!("/fido/sec/01"))); | ||
assert!(should_preserve_file(path!("/fido/x5c/01"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also add tests for the Trussed keys
nitrokey-3-firmware/components/provisioner-app/src/lib.rs
Lines 95 to 103 in 056b62c
const FILENAME_T1_PUBLIC: &[u8] = b"/attn/pub/00"; | |
const FILENAME_P256_SECRET: &[u8] = b"/attn/sec/01"; | |
const FILENAME_ED255_SECRET: &[u8] = b"/attn/sec/02"; | |
const FILENAME_X255_SECRET: &[u8] = b"/attn/sec/03"; | |
const FILENAME_P256_CERT: &[u8] = b"/attn/x5c/01"; | |
const FILENAME_ED255_CERT: &[u8] = b"/attn/x5c/02"; | |
const FILENAME_X255_CERT: &[u8] = b"/attn/x5c/03"; |
We preserve all certificates, counters, and keys that have an id lower than 255. These IDs are the `Special` ids as defined by trussed
cf7ac5a
to
19e168a
Compare
Let me know what rom to test, I have a nk3 that would require full device factory reset. Otherwise HOTP cannot happen I I cannot reset secrets with nitropy. |
@tlaurion You should be able to do that with the next |
This PR adds full device factory reset functionality
Depends on